package Properity;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public final class readPro {
	   
    private static String param1;   
    private static String param2;   
  
    static {   
        Properties prop = new Properties();   
        InputStream in = Object.class.getResourceAsStream("C://a.properties");   
        try {   
            prop.load(in);   
            param1 = prop.getProperty("url").trim();   
            param2 = prop.getProperty("age").trim();   
        } catch (IOException e) {   
            e.printStackTrace();   
        }   
    }   
  
    /**  
     * 私有构造方法，不需要创建对象  
     */   
    private readPro() {   
    }   
  
    public static String getParam1() {   
        return param1;   
    }   
  
    public static String getParam2() {   
        return param2;   
    }   
  
    public static void main(String args[]){   
        System.out.println(getParam1());   
        System.out.println(getParam2());   
    } 
}
